/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package core.factory;

import core.definition.MessageCommand;
import core.definition.SystemSubCommand;
import core.io.Message;
import core.io.Session;

/**
 *
 * @author Dung Pham
 */
public final class SystemMessageFactory {
    

    /**
     * tra ve sau khi xu ly message login
     *
     * @param session
     * @param code
     * @return
     */
    public static Message getMessageLogin(int code) {
        Message msg = new Message(MessageCommand.SYSTEM_COMMAND);
        try {
            msg.dos.writeInt(SystemSubCommand.SYS_LOGIN);
            msg.dos.writeInt(code);
        } catch (Exception ex) {
        } finally {
            return msg;
        }
    }
}
